Skip to main content

Create single Chat

note you can use v chat test server base url is http://170.178.195.150:81/api/v1/

  • URL: {{baseUrl}}room/single
  • Method: POST
  • Content-Type: JSON
  • Authentication: Bearer token is required in header in authorization : Bearer yourToken
  • Example request data:
{
"peerEmail": "user2",
"message":"first"
}
ParameterRequiredDescription
peerEmailtrueother user to start chat
messagetruefirst message it cant by null or empty string

Example response:

{
"success": true,
"data": {
"_id": "61cd92223bd8731be040e11e",
"blockerId": null,
"groupSetting": null,
"updatedAt": 1640862242845,
"creatorId": "61cd8fb33bd8731be040e103",
"roomType": "single",
"lastMessage": {
"_id": "61cd92223bd8731be040e128",
"messageType": "text",
"messageAttachment": null,
"createdAt": 1640862242839,
"content": "first",
"senderId": "61cd8fb33bd8731be040e103",
"senderName": "user1 updated name",
"senderImageThumb": "REGISTER_3c651b24-3912-4191-a131-af99292a75f9_THUMB.jpg",
"roomId": "61cd92223bd8731be040e11e"
},
"isOnline": 0,
"title": "user2",
"peerId": "61cd8ff33bd8731be040e108",
"peerEmail": "user2",
"thumbImage": "default_user_image.png",
"ifPeerReadMyLastMessage": 0,
"unReadCount": 0,
"roomMembersCount": 2,
"isMute": 0
}
}